package PTA_work;

/* 请在这里填写答案 */

import java.util.Scanner;
//class Exception extends java.lang.Exception {
//    public Exception() {
//        super("手机号码必须是数字，且为11位");
//        }
//}
class Tel {
    private String name;
    private String mobilephone;

    public Tel(String name, String mobilephone)  throws Exception {
        if(!mobilephone.matches("\\d{11}")) {
            throw new Exception("手机号码必须是数字，且为11位");
        }
        else {
            this.name = name;
            this.mobilephone = mobilephone;
        }
    }

    public String getName() {
        return name;
    }

    public String getMobilephone() {
        return mobilephone;
    }

}
public class test_6_72 {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan=new Scanner(System.in);
        String name=scan.next();
        String mobilephone=scan.next();
        try{
            Tel tel=new Tel(name,mobilephone);
            System.out.println("姓名："+tel.getName()+",手机号码："+tel.getMobilephone());
        }catch(Exception e){
            System.out.println(e);
        }
    }

}